package com.snaildesign.countdown.model;

import java.io.Serializable;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="COUNT_DOWN_STATE"
 *     
*/
public class CountDownState implements Serializable {

    /** identifier field */
    private String stateId;

    /** nullable persistent field */
    private String name;

    /** persistent field */
    private Set countDowns;

    /** full constructor */
    public CountDownState(String stateId, String name, Set countDowns) {
        this.stateId = stateId;
        this.name = name;
        this.countDowns = countDowns;
    }

    /** default constructor */
    public CountDownState() {
    }

    /** minimal constructor */
    public CountDownState(String stateId, Set countDowns) {
        this.stateId = stateId;
        this.countDowns = countDowns;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="STATE_ID"
     *         
     */
    public String getStateId() {
        return this.stateId;
    }

    public void setStateId(String stateId) {
        this.stateId = stateId;
    }

    /** 
     *            @hibernate.property
     *             column="NAME"
     *             length="50"
     *         
     */
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /** 
     *            @hibernate.set
     *             lazy="true"
     *             inverse="true"
     *             cascade="none"
     *            @hibernate.collection-key
     *             column="STATE_ID"
     *            @hibernate.collection-one-to-many
     *             class="com.snaildesign.countdown.model.CountDown"
     *         
     */
    public Set getCountDowns() {
        return this.countDowns;
    }

    public void setCountDowns(Set countDowns) {
        this.countDowns = countDowns;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("stateId", getStateId())
            .toString();
    }

}
